<?php
$id=$_GET['id'];
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="select * from zc where id=$id";
$arr=$dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
</head>
<body>
<form action="updatedo.php" method="post">
    <table>
        <tr>
            <td><input type="text" name="username" value="<?php echo $arr['username']?>"></td>
            <td><input type="password" name="old_pwd"></td>
            <td><input type="password" name="new_pwd"></td>
            <td><input type="hidden" name="id" value="<?php echo $arr['id']?>"></td>
            <td><input type="submit" value="提交"></td>
        </tr>
    </table>
</form>
</body>
</html>
